﻿Shader "XShaderLab/SimpleShader/MyFirstSharder"
{
    //Sharder use the first line as defination of name
    Properties
    {
        // Properties is those shown in Inspector
        // Name ("display on ins plane name", PropertyType) = DefaultValue
        // Pay attation that even dont define those properties here, the code in CG program
        //  can still get access to what is declear in CG, the main usage of Properties is 
        //  to pass those vairables and show it in Inspector Plane
        _Color("Display On ins plane Color", Color) = (1,1,1,1)
        _Int("Int", Int) = 2
        _Float("Float", Float) = 1.5
        _Range("Range", Range(0,6)) = 3
        _Vector("Vector", Vector) = (1, 2, 3, 4)
        _2D("2D", 2D) = ""{}
        _3D("3D", 3D) = "black"{}
        //Cubemap("Cube", Cubemap) = "white"{}
    }

    subshader
    {
        Tags//Tags that is not strictly Required
        {
            "RenderType" = "Opaque"
        }

        //RenderSetup is not strictly required
        Cull Back

        pass//pass must exist in a legal shader
        {
            Name "MyFirstPass" // set Name usage: in other shader: UsePass "XShaderLab/MyFirstShader/MyFirstPass"

            // the shader codes will be writen here
            // e.g. Surface shader, Vertex/Fragment shader, Fixed function shader, etc.

        }
    }

    FallBack "Diffuse" // if all subshader cant work on target computer, the shader in fallback will be used
}